﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JWXH.XH.pages.masterdetail;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace JWXH.XH
{
	[XamlCompilation(XamlCompilationOptions.Compile)]
	public partial class TestPage2 : ContentPage
	{
	    public bool IsShowMenu { get; set; } = false;
		public TestPage2 ()
		{
			InitializeComponent ();
		}

	    public static readonly BindableProperty MyPropertyProperty = BindableProperty.Create(
	        "HeightCurr",
	        typeof(string),
	        typeof(TestPage),
	        null,
	        BindingMode.TwoWay
	    );

	    public Double HeightCurr
        {

	        get { return (Double)GetValue(MyPropertyProperty); }
	        set { SetValue(MyPropertyProperty, value); }

	    }

	    private void BtnShowMenu_OnClick(object sender, EventArgs e)
	    {
	        LeftMenu.IsPresented = !LeftMenu.IsPresented;
	    }

	    private void LeftMenu_OnItemSelectd(object sender, SideMenuViewItemSelectdEventArg e)
	    {
	        this.LabelItemName.Text = $"标签内容：{e.Text}";
	        this.LeftMenu.IsPresented = false;
	    }
	}
}